<template>
  <el-row :gutter="20">
    <el-col :span="4">
      <el-divider content-position="left">部门</el-divider>
      <dep-tree :tree-data="treeData" @depId="(id) => depId = id" />
    </el-col>
    <el-col :span="20">
      <el-divider content-position="left">用户</el-divider>
      <user :tree-data="treeData" :dep-id="depId" />
    </el-col>
  </el-row>
</template>

<script>
import User from './User'
import DepTree from './DepTree'
export default {
  components: {
    User,
    DepTree
  },
  data() {
    return {
      depId: '',
      treeData: []
    }
  }
}
</script>
